<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .div{
            width:100px;
            height:100px;
            background:pink;
            margin:0 auto;
            animation:fadenum ease-in 2s;
            animation-fill-mode: forwards;
            position: absolute;
            will-change: left;
            left: 20px;
            top: 220px
        }
        @keyframes fadenum {
            50%{
                transform:translateX(80px);
                /* left: 80px; */
                /* opacity:0; */
            }
            100%{
                /* left: 140px; */
                transform:translateX(140px);
                /* opacity:0; */
            }
}
</style>
</head>
<body>
<div class="div">
    这是一个向左平移消失的div
</div>
</body>
</html>